package vo;

/**
 * 响应数据对象 - 把响应客户端的数据做一个统一的封装
 * <p>
 * 这是一个前后端的一个约定 - 方便前端访问后端的数据
 *
 * @author ZQX
 * @date 2024-12-03
 */
public class ResponseData {
    /**
     * 状态代码
     */
    private Integer code;
    /**
     * 响应数据
     */
    private Object data;
    /**
     * 响应消息
     */
    private String msg;

    public ResponseData() {
    }

    public ResponseData(Integer code, Object data) {
        this.code = code;
        this.data = data;
    }

    public ResponseData(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public ResponseData(Integer code, Object data, String msg) {
        this.code = code;
        this.data = data;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
